package com.link.base.tencent.corpwx.accounttag.service;

import com.alibaba.fastjson.JSONArray;
import com.link.base.tencent.corpwx.accounttag.model.AccountTagItem;
import com.link.core.basic.service.BasicService;

import java.util.List;

/**
 * 客户标签
 *
 * @author 欧阳振强
 * @date 2020-01-02 15:02:09.0
 */
public interface AccountTagItemService extends BasicService<AccountTagItem> {
    /**
     * 删除标签
     *
     * @author 欧阳振强
     * @date 2020/01/04
     * @param accountTagItem 标签
     */
    void delTagItemById(AccountTagItem accountTagItem) throws Exception;

    /**
     * 同步标签到企业微信
     *
     * @author 欧阳振强
     * @date 2020/01/04
     * @param accountTagItem 标签
     */
    void syncTagItemToWx(AccountTagItem accountTagItem) throws Exception;

    /**
     * 给定一个JSONArray和一个标签对象列表，回写接口新增的标签信息到数据库
     *
     * @author 欧阳振强
     * @date 2020/01/04
     * @param tagItemArray 接口返回的标签数组
     * @param accountTagItemList CRM同步之前的标签对象列表
     */
    void setTagItemByJSON(JSONArray tagItemArray, List<AccountTagItem> accountTagItemList) throws Exception;
}